<template>
  <!-- 在线监测 -->
  <div>
    <div class="container">
      <div class="container-top">
        <div class="back" @click="goBack"></div>
      </div>
      <div class="head">
        <OnlieHead />
      </div>
      <div class="center borderStyle centerbox relative">
        <div
          class="title centertitleStyle centerbox title-relative"
          @click="titleClick('在线监测异常装置分布')"
        >在线监测异常装置分布</div>
        <OnlieCenter :dataList="dataList" :xAxisData="xAxisData" />
      </div>
      <!-- <div class="center centerbox borderStyle">
      <OnlieCenter />
      </div>-->
      <div class="bottom borderStyle centerbox relative">
        <div
          class="title centertitleStyle centerbox title-relative"
          @click="titleClick('具体记录')"
        >具体记录</div>
        <OnlieBottom />
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { EChartOption } from "echarts";
import OnlieHead from "../../commponents/OnlieHead/index.vue";
import OnlieCenter from "../../commponents/OnlieCenter/index.vue";
import OnlieBottom from "../../commponents/OnlieBottom/index.vue";
@Component({
  components: {
    OnlieHead,
    OnlieCenter,
    OnlieBottom,
  },
})
export default class Onlie extends Vue {
  //传图表得数据
  public xAxisData: any = ["装置总数", "装置异常数"];
  public dataList: any = [
    { name: "宁波理工", total: 400, early: 300, onLine: 200 },
    { name: "长圆深瑞", total: 400, early: 300, onLine: 200 },
    { name: "西安金源", total: 400, early: 300, onLine: 200 },
    { name: "保定天威", total: 400, early: 300, onLine: 200 },
    { name: "山东电力", total: 400, early: 300, onLine: 200 },
    { name: "未知厂家", total: 400, early: 300, onLine: 200 },
    { name: "宁波理工", total: 400, early: 300, onLine: 200 },
    { name: "长圆深瑞", total: 400, early: 300, onLine: 200 },
    { name: "西安金源", total: 400, early: 300, onLine: 200 },
    { name: "保定天威", total: 400, early: 300, onLine: 200 },
    { name: "山东电力", total: 400, early: 300, onLine: 200 },
    { name: "未知厂家", total: 400, early: 300, onLine: 200 },
  ];
  // 返回按钮
  private goBack(val: string) {
    window.history.back();
    // this.$router.push("index");
  }
}
</script>

<style lang='scss' scoped>
.container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0.24rem 0.24rem 0.24rem;
  // background-color: pink;
  &-top {
    width: 100%;
    // height: 2%;
    // background-color: pink;
    display: flex;
    align-items: center;
    .back {
      width: 0.9rem;
      height: 0.31rem;
      margin-left: auto;
      background-image: url("../../../../assets/img/return.png");
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
    }
  }
  .head {
    width: 100%;
    height: 10%;
    // background-color: grey;
    // margin-bottom: 0.29rem;
  }
  .center {
    width: 100%;
    height: 26%;
    padding-top: 1%;
    // background-color: pink;
    // margin-bottom: 0.38rem;
  }
  .bottom {
    width: 100%;
    height: 56%;
    // background-color: rgb(179, 245, 177);
  }
}
</style>
